import { IMessageBase } from "../../Framework/MQ/IMessageBase";
import { MessageManager } from "../../Framework/MQ/MessageManager";
import { SerializeStream } from "../../Framework/Serialize/SerializeStream";
import { EPetSireOperation } from "./EPetSireOperation";
import { SEntityId } from "./SEntityId";
import { SErrorMsg } from "./SErrorMsg";
import { SPetSireInfo } from "./SPetSireInfo";
type int = number;
//class SPetSire
    
    export  class SPetSire extends IMessageBase
    {
        constructor(arg1: Boolean=false)
        {
            
            super();if (arg1) 
            {
                MessageManager.instance().regist(this);
            }
            return;
        }

        public /* override */ getType(): int
        {
            return this._type;
        }

        public /* override */ clone(): IMessageBase
        {
            return new SPetSire();
        }

        public /* override */ __write(arg1: SerializeStream): void
        {
            this.oper.__write(arg1);
            this.fromEntity.__write(arg1);
            arg1.writeString(this.petSireId);
            arg1.writeDate(this.endDt);
            this.error.__write(arg1);
            this.fromInfo.__write(arg1);
            this.toInfo.__write(arg1);
            return;
        }

        public /* override */ __read(arg1: SerializeStream): void
        {
            this.oper = EPetSireOperation.__read(arg1);
            this.fromEntity = new SEntityId();
            this.fromEntity.__read(arg1);
            this.petSireId = arg1.readString();
            this.endDt = arg1.readDate();
            this.error = new SErrorMsg();
            this.error.__read(arg1);
            this.fromInfo = new SPetSireInfo();
            this.fromInfo.__read(arg1);
            this.toInfo = new SPetSireInfo();
            this.toInfo.__read(arg1);
            return;
        }

        public /* const */_type: int=20320;

        public /* var */oper: EPetSireOperation;

        public /* var */fromEntity: SEntityId;

        public /* var */petSireId: string;

        public /* var */endDt: Date;

        public /* var */error: SErrorMsg;

        public /* var */fromInfo: SPetSireInfo;

        public /* var */toInfo: SPetSireInfo;

        public static /* var */_regist: SPetSire;
    }

            SPetSire._regist = new SPetSire(true);
        